package com.shanling.shanlingcontroller.ui.activity;

import android.os.Bundle;
import android.widget.ImageView;

import com.shanling.shanlingcontroller.R;
import com.shanling.shanlingcontroller.base.BaseAppCompatActivity;
import com.shanling.shanlingcontroller.bean.BluetoothState;
import com.shanling.shanlingcontroller.bean.Constants;
import com.shanling.shanlingcontroller.bean.EventCenter;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class RemindActivity extends BaseAppCompatActivity {

    @BindView(R.id.iv_back)
    ImageView ivBack;

    @Override
    protected void getBundleExtras(Bundle extras) {

    }

    @Override
    protected int getContentViewLayoutID() {
        return R.layout.activity_remind;
    }

    @Override
    protected void initViewsAndEvents() {
    }

    @Override
    protected void initData() {


    }

    @Override
    protected boolean isBindEventBusHere() {
        return true;
    }

    @Override
    protected void onEventComing(EventCenter eventCenter) {
        switch (eventCenter.getEventCode()) {
            case Constants.BLUETOOTH_STATE:
                BluetoothState state = (BluetoothState) eventCenter.getData();
                if (state == null) {
                    return;
                }
                switch (state.getState()) {
                    case Constants.CONNECTED:
                        readyGoThenKill(MainActivity.class);
                        break;
                }
                break;
        }
    }

    @Override
    protected boolean toggleOverridePendingTransition() {
        return false;
    }

    @Override
    protected TransitionMode getOverridePendingTransitionMode() {
        return null;
    }


    @OnClick(R.id.iv_back)
    public void onViewClicked() {
        finish();
    }
}
